#!/bin/bash
#function: 自动安装go1.9.4
#parmeter:
#author: yeslf
#version:
#Test: ubuntu1604
sudo apt-get install autoconf automake libtool curl make g++ unzip gcc  -y

sudo mv go /usr/local/
for i  in /usr/local/go/bin/*; do  sudo  ln -s $i  /usr/bin/ ; done

sudo mkdir -p  /usr/local/go/gopath/src/github.com






sudo ldconfig

go version

sudo cat>>/etc/environment<</
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN
export GOPATH=/usr/local/go/gopath

/

source  /etc/environment




